<?php
		mysql_data_seek($forms_info, 0);
		/*echo "<pre>";
			print_r($forms_info);
		echo "</pre>";*/
		//$pup_only = $forms_info ;
		/*while($crap = sqlFetchArray($pup_only)){
			echo "<pre>";
			print_r($crap);
		echo "</pre>";
		}*/
		
		$best1 = '';
		$best2 = '';
		$best3 = '';
		
		function create_best($value){
			global $best1,$best2,$best3,$forms_info;
			$best1 = "<td><input type='text' id='1_corrected_1' name='1_corrected_1'></input></td>";
			$best2 = "<td><input type='text' id='1_corrected_2' name='1_corrected_2'></input></td>";
			$best3 = "<td><input type='text' id='1_corrected_3' name='1_corrected_3'></input></td>";
			
			$number = 2;
			while($row = sqlFetchArray($forms_info)){
				$best1 .= "<td><input type='text' id='".$number."_corrected_1' name='".$number."_corrected_1' value ='".$row['snellen']."'></input></td>";
				$best2 .= "<td><input type='text' id='".$number."_corrected_2' name='".$number."_corrected_2' value ='".$row['finger_count']."'></input></td>";
				$best3 .= "<td><input type='text' id='".$number."_corrected_3' name='".$number."_corrected_3' value ='".$row['hand_movement']."'></input></td>";
				$number += 1;
			}
		}
		create_best(0);
	
?>
        <table class="vertical_table" id='t_best_corrected_visual_acuity'>
            <caption><?php echo xl('Best Corrected Visual Acuity');?></caption>
            <thead>
                <tr>
                    <th colspan="3">1. <?php echo xl('Snellen'); ?>:20/</th>
                </tr>
				<tr>
                    <th colspan="3">2. <?php echo xl('Finger Count'); ?>:</th>
                </tr>
				<tr>
                    <th colspan="3">3. <?php echo xl('Hand Movement'); ?>:</th>
                </tr>
            </thead>
            <tbody>
				<tr>
					<?php echo $best1;?>
				</tr>
				<tr>
					<?php echo $best2;?>
				</tr>
				<tr>
					<?php echo $best3;?>
				</tr>
            </tbody>
        </table>